package com.eshop.modules.shop.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("material_group")
public class MaterialGroup extends BaseDomain
{
    @TableId(type = IdType.UUID)
    private String id;
    private String createId;
    private String name;
    
    public void copy(final MaterialGroup source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public String getId() {
        return this.id;
    }
    
    public String getCreateId() {
        return this.createId;
    }
    
    public String getName() {
        return this.name;
    }
    
    public void setId(final String id) {
        this.id = id;
    }
    
    public void setCreateId(final String createId) {
        this.createId = createId;
    }
    
    public void setName(final String name) {
        this.name = name;
    }
    
    public String toString() {
        return "MaterialGroup(id=" + this.getId() + ", createId=" + this.getCreateId() + ", name=" + this.getName() + ")";
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof MaterialGroup)) {
            return false;
        }
        final MaterialGroup other = (MaterialGroup)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0075: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0075;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0075;
            }
            return false;
        }
        final Object this$createId = this.getCreateId();
        final Object other$createId = other.getCreateId();
        Label_0112: {
            if (this$createId == null) {
                if (other$createId == null) {
                    break Label_0112;
                }
            }
            else if (this$createId.equals(other$createId)) {
                break Label_0112;
            }
            return false;
        }
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null) {
            if (other$name == null) {
                return true;
            }
        }
        else if (this$name.equals(other$name)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof MaterialGroup;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $createId = this.getCreateId();
        result = result * 59 + (($createId == null) ? 43 : $createId.hashCode());
        final Object $name = this.getName();
        result = result * 59 + (($name == null) ? 43 : $name.hashCode());
        return result;
    }
}
